<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相对定位</title>
    <style>
        .c1{
            width: 100px;
            height: 100px;
            background-color: #330000;
        }
        .c2{
            position: relative;
            left: 200px;
            top:-100px;
        }

        .c4{
            position: relative;
            left: 100px;
            top:-200px;
        }

        .c5{
            position: relative;
            left: 200px; 
            top:-200px;
        }
    </style>
</head>
<body>
    <div class="c1"></div>
    <div class="c1 c2"></div>
    <div class="c1"></div>
    <div class="c1 c4"></div>
    <div class="c1 c5"></div>
</body>
</html>